package com.example.andruino;


import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;



public class MainActivity extends Activity {

	private EditText clave;
	Toast toast;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		clave = (EditText) findViewById(R.id.txtclave);
		TextView textView = (TextView)findViewById(R.id.textView1);
		textView.setTextColor(Color.WHITE);
		clave.setTextColor(Color.WHITE);
		}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
	

	public void verificar(View vista)
	{
		String claveintroducida = clave.getText().toString();
		if (claveintroducida.equals("abc123")){
			Intent log = new Intent(this,Login.class);
			finish();
			startActivity(log);
		}
		else
		{
		
		toast = Toast.makeText(this, "Clave Incorrecta", Toast.LENGTH_SHORT);
		toast.show(); 
	

		}
		
	}
	public void salir(View vista)
	{
		finish();
	}
}
